local function Fn()
    local Fx = Class()
    local function GetConfig(str)
        return tonumber(GetModConfigData(str) or 5)
    end
    function Fx:Get_CMD_Table()
        -- -- -- 用到的参数
        -- _table["npc_event_give_basic_supplies"] = {
        --     event_name = "npc_event_give_basic_supplies",    -- 用于刷debuff 的时候，不用事先准备，概率计算器会自己添加
        --     NPC_NAME = nil,                                  ---- nil 的时候 随机列表里的npc ，
                                                                ---- NPC_NAME == "player" 的时候刷新在玩家身上 
                                                                ---- prefab 名字，刷新指定的 inst 实体
        --                                                      ---- NPC_NAME = {"wilson_npc","wolfgang_npc","woodie_npc","webber_npc"} -- 指定某些随机 必须是prefab name
        --     time = 100,                                      ---- time out 
        --     Probability = 5,                                 ---- 概率
        --     ban = {"wilson","woodie"},                       ---- 禁用列表，注意名字
        --     CampProtect = nil,                               ----- 保护营地，true 的时候检查玩家位置
        --     Unable_To_Refuse = nil,                          ----- true 的时候无法被玩家赶走
        --     SpawnDistance = nil,                             ----- 和玩家的刷新距离
        --     SpawnPoint = Vector3(),                          ----- 特殊事件需要提前刷新坐标
        --      tags = {"tag1","tag2" }                         ----- 添加tags 给npc  tags = {"notarget", "noattack"} --不被其他怪物攻击
        -- }


        local temp_CMD_List = {
            ["npc_event_give_basic_supplies"]   =     { time = 100,Probability = 5,tags = {"notarget", "noattack"} },
            ["npc_event_ghost"]                 =     { time = 240,Probability = GetConfig("npc_event_ghost") , ban = TUNING.NPC_CONFIG.NPC_NAME_LIST_GHOST_BAN ,tags = {"notarget", "noattack", "flight"}},
            ["npc_event_thief"]                 =     { time = 100,Probability = GetConfig("npc_event_thief") ,Unable_To_Refuse = true,tags = {"notarget", "noattack"}} ,
            ["npc_event_minifan"]               =     { time = 240,Probability = GetConfig("npc_event_minifan") ,tags = {"notarget", "noattack"} } ,
            ["npc_event_woodie_beaver"]         =     { time = 240,Probability = GetConfig("npc_event_woodie_beaver"), NPC_NAME = "player",tags = {"notarget", "noattack"}} ,
            ["npc_event_freeze"]                =     { time = 250,Probability = GetConfig("npc_event_freeze") , Unable_To_Refuse = true ,tags = {"notarget", "noattack"}} ,
            ["npc_event_deal_with_bat"]         =     { time = 250,Probability = GetConfig("npc_event_deal_with_bat"), NPC_NAME = "monster_npc_bat",tags = {"notarget", "noattack"}} ,
            ["npc_event_meteor"]                =     { time = 250,Probability = GetConfig("npc_event_meteor"), Unable_To_Refuse = true ,CampProtect = true} ,
            ["npc_event_ask_for_razor"]         =     { time = 100,Probability = GetConfig("npc_event_ask_for_razor"), NPC_NAME = {"wilson_npc","woodie_npc","wolfgang_npc","webber_npc","wagstaff_2_npc","waxwell_npc","woodlegs_npc"} ,tags = {"notarget", "noattack"}} ,
            ["npc_event_bushhat"]               =     { time = 250,Probability = GetConfig("npc_event_bushhat"),tags = {"notarget", "noattack"}} ,
            ["npc_event_fishbowl"]              =     { time = 250,Probability = GetConfig("npc_event_fishbowl"),NPC_NAME = "player"} ,
            ["npc_event_maxwell_and_shadow"]    =     { time = 100,Probability = GetConfig("npc_event_maxwell_and_shadow"),NPC_NAME = "waxwell_npc",tags = {"notarget", "noattack"} } ,
            ["npc_event_livingtrees"]           =     { time = 100,Probability = GetConfig("npc_event_livingtrees"),Unable_To_Refuse = true , tags = {"notarget", "noattack"} } ,
            ["npc_event_trident"]               =     { time = 100,Probability = GetConfig("npc_event_trident"),tags = {"notarget", "noattack"} } ,
            ["npc_event_telestaff"]             =     { time = 100,Probability = GetConfig("npc_event_telestaff"),Unable_To_Refuse = true, tags = {"notarget", "noattack"} } ,
            ["npc_event_clockwork_guard"]       =     { time = 100,Probability = GetConfig("npc_event_clockwork_guard"), NPC_NAME = "player" } ,
            ["npc_event_wes_and_ballons"]       =     { time = 100,Probability = GetConfig("npc_event_wes_and_ballons"), NPC_NAME = "wes_npc",tags = {"notarget", "noattack"} } ,
            ["npc_event_wolfgang_and_horn"]     =     { time = 350,Probability = GetConfig("npc_event_wolfgang_and_horn"), Unable_To_Refuse = true , NPC_NAME = "wolfgang_npc",tags = {"notarget", "noattack"} } ,
            ["npc_event_butterflies"]           =     { time = 250,Probability = GetConfig("npc_event_butterflies"),tags = {"notarget", "noattack"}} ,
            ["npc_event_catch_game"]            =     { time = 100,Probability = GetConfig("npc_event_catch_game"),NPC_NAME = "player"} ,
            ["npc_event_pigman_arena"]          =     { time = 100,Probability = GetConfig("npc_event_pigman_arena"),NPC_NAME = "player"} ,
            ["npc_event_treasure_map"]          =     { time = 100,Probability = GetConfig("npc_event_treasure_map"),NPC_NAME = "player"} ,
            ["npc_event_gift_from_walrus"]      =     { time = 150,Probability = GetConfig("npc_event_gift_from_walrus"),NPC_NAME = "monster_npc_walrus"} ,

            
        }

        return temp_CMD_List
    end

    return Fx
end

TUNING.NPC_CMD_TABLE = Fn():Get_CMD_Table()


local DLC_EVENTS_PROBABILITY = 5
if TUNING.NPC_CONFIG.DLC_HIDDEN_EVENTS ~= true then
    DLC_EVENTS_PROBABILITY = 0
end
TUNING.NPC_CMD_TABLE_DLC_CHARACTERS = {
    ["wurt"] = {    ----- 小鱼人专属事件
        -- ["npc_event_minifan"]          =     { time = 100,Probability = 0,NPC_NAME = "wurt_npc"} ,
    },
    ["wanda"] = {   ----- 旺达专属事件
        ["npc_event_gift_from_wanda"]                    =     { time = 100,Probability = DLC_EVENTS_PROBABILITY,NPC_NAME = "wanda_npc",tags = {"notarget", "noattack"}} ,
    },
    ["wormwood"] = {    --- 植物人专属事件
        ["npc_event_gift_from_wormwood"]                  =     { time = 100,Probability = DLC_EVENTS_PROBABILITY,NPC_NAME = "wormwood_npc",tags = {"notarget", "noattack"}} ,
    },
    ["wortox"] = {      --- 小恶魔专属事件
        ["npc_event_gift_from_wortox"]                    =     { time = 100,Probability = DLC_EVENTS_PROBABILITY,NPC_NAME = "wortox_npc",tags = {"notarget", "noattack"}} ,
        ["npc_event_trick_or_treat_from_wortox"]          =     { time = 100,Probability = DLC_EVENTS_PROBABILITY,NPC_NAME = "wortox_npc",tags = {"notarget", "noattack"},Unable_To_Refuse = true} ,
    }
}

